<div class="layui-tab layui-tab-fixed layui-tab-brief">
  <ul class="layui-tab-title">
    <li class="layui-this">全局配置</li>
    <li>全局参数</li>
	<li>全局Cookie</li>
    <li>全局Header</li>
  </ul>
  <div class="layui-tab-content editor-form-node">
    <div class="layui-tab-item layui-show">
    	<form class="layui-form">
    		<div class="layui-form-item">
    			<label class="layui-form-label">爬虫名称</label>
    			<div class="layui-input-block">
    				<input type="text" name="spiderName" placeholder="请输入爬虫名称" autocomplete="off" class="layui-input" value="{{d.data.object.spiderName || '未定义名称'}}">
    			</div>
    		</div>
    		<div class="layui-form-item">
    			<label class="layui-form-label">最大线程数</label>
    			<div class="layui-input-block">
    				<input type="text" name="threadCount" placeholder="请输入线程数" autocomplete="off" class="layui-input" value="{{=d.data.object.threadCount}}">
    			</div>
    		</div>
    	</form>
    </div>
    <div class="layui-tab-item">
   		<form class="layui-form">
	    	{{# layui.each(d.data.object['parameter-name'],function(index){ }}
			<div id="parameter{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
				<div class="layui-form-item layui-form-relative">
					<i class="layui-icon layui-icon-close header-remove"></i>
					<label class="layui-form-label">参数名</label>
					<div class="layui-input-block">
						<input type="text" name="parameter-name" placeholder="请输入参数名" autocomplete="off" class="layui-input array" value="{{=d.data.object['parameter-name'][index]}}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">参数值</label>
					<div class="layui-input-block array" placeholder="请输入参数值" codemirror="parameter-value" data-value="{{=d.data.object['parameter-value'][index]}}"></div>
				</div>
				<hr>
			</div>
	   		{{# }) }}
	   		<div class="layui-form-item">
	   			<div class="layui-input-block">
	    			<button class="layui-btn parameter-add" type="button">添加一个参数</button>
	    		</div>
	    	</div>
	    </form>
    </div>
	<div class="layui-tab-item">
	  <form class="layui-form">
		  {{# layui.each(d.data.object['cookie-name'],function(index){ }}
		  <div id="cookie{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
			  <div class="layui-form-item layui-form-relative">
				  <i class="layui-icon layui-icon-close cookie-remove"></i>
				  <label class="layui-form-label">Cookie名</label>
				  <div class="layui-input-block">
					  <input type="text" name="cookie-name" placeholder="请输入Cookie名" autocomplete="off" class="layui-input array" value="{{=d.data.object['cookie-name'][index]}}">
				  </div>
			  </div>
			  <div class="layui-form-item">
				  <label class="layui-form-label">Cookie值</label>
				  <div class="layui-input-block array" placeholder="请输入Cookie值" codemirror="cookie-value" data-value="{{=d.data.object['cookie-value'][index]}}"></div>
			  </div>
			  <hr>
		  </div>
		  {{# }) }}
		  <div id="addCookieBtn" class="layui-form-item">
			  <div class="layui-input-block">
				  <button class="layui-btn cookie-add" type="button">添加一个Cookie</button>
			  </div>
		  </div>
		  <div class="layui-form-item">
			  <div class="layui-input-block">
				  <button class="layui-btn cookie-batch" type="button">批量设置Cookie</button>
			  </div>
		  </div>
	  </form>
	</div>
    <div class="layui-tab-item">
   		<form class="layui-form">
			{{# layui.each(d.data.object['header-name'],function(index){ }}
			<div id="header{{=index}}" class="draggable" draggable="true" ondragstart="drag(event)" ondrop="drop(event)" ondragover="allowDrop(event)">
				<div class="layui-form-item layui-form-relative">
					<i class="layui-icon layui-icon-close header-remove"></i>
					<label class="layui-form-label">header名</label>
					<div class="layui-input-block">
						<input type="text" name="header-name" placeholder="请输入header名" autocomplete="off" class="layui-input array" value="{{=d.data.object['header-name'][index]}}">
					</div>
				</div>
				<div class="layui-form-item">
					<label class="layui-form-label">header值</label>
					<div class="layui-input-block array" placeholder="请输入header值" codemirror="header-value" data-value="{{=d.data.object['header-value'][index]}}"></div>
				</div>
				<hr>
			</div>
	   		{{# }) }}
	   		<div id="addHeaderBtn" class="layui-form-item">
	   			<div class="layui-input-block">
	    			<button class="layui-btn header-add" type="button">添加一个Header</button>
	    		</div>
	    	</div>
			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn header-batch" type="button">批量设置Header</button>
				</div>
			</div>
	    </form>
    </div>
  </div>
</div>